package com.platform.file.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.platform.common.core.annotation.Excel;
import com.platform.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 文件操作日志对象 dic_file_log
 *
 * @author platform
 * @date 2023-05-08
 */
public class DicFileLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 所属服务CODE
     */
    @Excel(name = "所属服务CODE")
    private String serviceCode;

    /**
     * 所属服务名称
     */
    @Excel(name = "所属服务名称")
    private String serviceName;

    /**
     * 文件名称
     */
    @Excel(name = "文件名称")
    private String fileName;

    /**
     * 文件类型
     */
    @Excel(name = "文件类型")
    private String fileType;

    /**
     * 文件大小（单位 M）
     */
    @Excel(name = "文件大小", readConverterExp = "单=位,M=")
    private BigDecimal fileSize;

    /**
     * 文件路径
     */
    @Excel(name = "文件路径")
    private String fileUrl;

    /**
     * 文件状态（0：已删除 1：正常）
     */
    @Excel(name = "文件状态", readConverterExp = "0=：已删除,1=：正常")
    private String fileStatus;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operateTime;

    /**
     * 操作类型（0：删除 1：上传 2：查看）
     */
    @Excel(name = "操作类型", readConverterExp = "0=：删除,1=：上传,2=：查看")
    private String operateType;

    private String bucketName;

    private String fileUrlSecret;

    private String folder;

    private String fileTag;

    /**
     * 文件唯一值
     */
    private String fileKey;

    public String getFileKey() {
        return fileKey;
    }

    public void setFileKey(String fileKey) {
        this.fileKey = fileKey;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setFileTag(String fileTag) {
        this.fileTag = fileTag;
    }

    public String getFileTag() {
        return fileTag;
    }

    public void setFolder(String folder) {
        this.folder = folder;
    }

    public String getFolder() {
        return folder;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileSize(BigDecimal fileSize) {
        this.fileSize = fileSize;
    }

    public BigDecimal getFileSize() {
        return fileSize;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileStatus(String fileStatus) {
        this.fileStatus = fileStatus;
    }

    public String getFileStatus() {
        return fileStatus;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    public String getOperateType() {
        return operateType;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setFileUrlSecret(String fileUrlSecret) {
        this.fileUrlSecret = fileUrlSecret;
    }

    public String getFileUrlSecret() {
        return fileUrlSecret;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("serviceCode", getServiceCode())
                .append("serviceName", getServiceName())
                .append("fileName", getFileName())
                .append("fileType", getFileType())
                .append("fileSize", getFileSize())
                .append("fileUrl", getFileUrl())
                .append("fileStatus", getFileStatus())
                .append("operateTime", getOperateTime())
                .append("operateType", getOperateType())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("bucketName", getBucketName())
                .append("fileUrlSecret", getFileUrlSecret())
                .toString();
    }
}
